#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include "notemapper.h"
#include "notewidget.h"
#include "wallperwidget.h"
#include <QMainWindow>
#include <QPropertyAnimation>
#include <QSystemTrayIcon>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

protected:
    void dragEnterEvent(QDragEnterEvent *event) override;

    void dropEvent(QDropEvent *event) override;

    //    void closeEvent(QCloseEvent *e) override;

    void mousePressEvent(QMouseEvent *event) override;

    void mouseMoveEvent(QMouseEvent *event) override;

    void mouseReleaseEvent(QMouseEvent *event) override;

private:
private slots:

    void on_changeWallpaper_clicked();

    void on_calc_clicked();

    void on_pushButton_clicked();

    void updateNoteContentLabel();

    void showAllFilesFromDesktop();

    void initTrayIcon();

    void startupAnimation();

private:
    Ui::MainWindow *ui;

    WallperWidget *wallpaperWidget;

    NoteWidget *noteWidget;

    NoteMapper *noteMapper;

    QSystemTrayIcon *trayIcon;

    QPropertyAnimation *m_showAnimation;
    QPropertyAnimation *m_hideAnimation;
    bool m_bMouseIn = false;

    bool dragging = false;

    QPoint dragPosition;
};
#endif // MAINWINDOW_H
